﻿using Toolkit.Web.ExtensionMethods;

namespace Toolkit.Web.ViewComponents.Notification
{
    public static class NotificationExtensions
    {
        public static NotificationBuilder Notification(this ViewComponentFactory viewComponentFactory, NotificationType type)
        {
            return Notification(viewComponentFactory, type, null);
        }

        public static NotificationBuilder Notification(this ViewComponentFactory viewComponentFactory, NotificationType type, object htmlAttributes)
        {
            Notification notification = new Notification(viewComponentFactory.Writer, type);
            notification.HtmlAttributes.Merge(htmlAttributes, true);
            return new NotificationBuilder(notification);
        }
    }
}
